MMKE: Multi-trial vector-based monkey king evolution algorithm and its applications for engineering optimization problems

Monkey king evolution (MKE) is a population-based differential evolutionary algorithm in which the single evolution strategy and the control parameter affect the convergence and the balance between exploration and exploitation. Since evolution strategies have a considerable impact on the performance of algorithms, collaborating multiple strategies can significantly enhance the abilities of algorithms. This is our motivation to propose a multi-trial vector-based monkey king evolution algorithm named MMKE. It introduces novel best-history trial vector producer (BTVP) and random trial vector producer (RTVP) that can effectively collaborate with canonical MKE (MKE-TVP) using a multi-trial vector approach to tackle various real-world optimization problems with diverse challenges. It is expected that the proposed MMKE can improve the global search capability, strike a balance between exploration and exploitation, and prevent the original MKE algorithm from converging prematurely during the optimization process. The performance of the MMKE was assessed using CEC 2018 test functions, and the results were compared with eight metaheuristic algorithms. As a result of the experiments, it is demonstrated that the MMKE algorithm is capable of producing competitive and superior results in terms of accuracy and convergence rate in comparison to comparative algorithms. Additionally, the Friedman test was used to examine the gained experimental results statistically, proving that MMKE is significantly superior to comparative algorithms. Furthermore, four real-world engineering design problems and the optimal power flow (OPF) problem for the IEEE 30-bus system are optimized to demonstrate MMKE’s real applicability. The results showed that MMKE can effectively handle the difficulties associated with engineering problems and is able to solve single and multi-objective OPF problems with better solutions than comparative algorithms.


Introduction
Metaheuristic algorithms are shown to be advantageous for addressing challenging optimization problems with diverse properties, including but not limited to high dimensionality, multimodality, and non-differentiability in a reasonable time [1]. This has led to the widespread use of these algorithms and an increasing trend of developing new and improved algorithms. Such techniques can be considered as approximate algorithms that are the successful alternative approach for solving problems in polynomial time. The stochastic nature of these algorithms keeps them distinct in comparison with deterministic methods or conventional optimization algorithms. Nature-inspired algorithms are a class of problem solvers inspired by nature's natural phenomena to design new and robust competing algorithms. Taking into account the No-Free-Lunch (NFL) theorem [2], that asserts no single optimization algorithm can handle all problems of any complexity, numerous new optimization algorithms have been designed that are capable of handling the vast majority of optimization issues. Furthermore, the same algorithm is also observed to have variable outcomes when applied to the same problem depending on the values of the parameters.
Metaheuristic algorithms can be categorized as either population-based or single solutionbased. The single solution-based algorithms are focused on exploiting and expanding a solution for crossing the local optimal point. In contrast to single-based metaheuristics, population-based metaheuristics begin with a collection of solutions known as population or swarm. They then construct a new population of solutions via an iterative process. This allows for the transmission of information between the solutions. In real-world issues, there is a strong likelihood that a single solution-based algorithm may become stuck on the local optima. On the other hand, population-based algorithms are known to be extremely exploratory of the search space, with less incidence of becoming stuck locally. If a solution traps within the local suboptimal, further iterations will help to avoid it by including alternative solutions. As a downside, these algorithms are computationally costly and need more objective function evaluations.
The monkey king evolution (MKE) [25] is one of the algorithms in the evolution-based category inspired by a Chinese mythological novel. The population is guided in this populationbased algorithm by the best monkey king of the whole population. The MKE algorithm is prone to premature convergence and insufficient balance between exploitation and exploration. These shortcomings originate from the MKE's evolution scheme (search strategy) that updates all monkey kings' positions by considering the best one and using a fixed control parameter. Moreover, the MKE algorithm has a single evolution strategy (search strategy) to deal with various kinds of problems that results in inefficient performance when confronted with various issues. Thus, by incorporating multi-evolution strategies into the MKE algorithm, we aim to make it more effective in solving a wide variety of real-world optimization problems, which is the primary goal of this work.
As part of our prior work, we introduced a multi-trial vector (MTV) approach [26] to leverage a mix of evolution strategies and handle various issues. This approach comprised four components: winner-based distributing, multi-trial vector producing, evaluating and population updating, and life-time archiving. The MTV approach has the merits of introducing and combining multiple search strategies incorporated by defining distribution policies over the population, which increases the algorithms' performance. Using the MTV approach can fulfill the need to define different strategies that can be adapted to various characteristics of problems in every stage of the search process to avoid local optima entrapment, prevent premature convergence, and strike an appropriate balance between exploitation and exploration. It is our motivation to use the merits of the MTV approach and a combination of three trial vectors to significantly improve the MKE algorithm's performance and handle various complex realworld optimization issues.
In this paper, we propose an effective multi-trial vector-based monkey king evolution (MMKE) algorithm using the multi-trial vector (MTV) approach [26]. In the design of the multi-trial vector producing step of the MTV approach, novel best-history trial vector producer (BTVP) and random trial vector producer (RTVP) are introduced to cooperate with canonical MKE (MKE-TVP). Each trial vector producer (TVP) is adjusted to maintain a particular search behavior during the process of solving different problems with diverse characteristics. Also, each TVP is used to apply to a section of the population that is dedicated to that TVP. Through the winner-based MTV distribution strategy, the percentage of the devoted population is adjusted at consistent intervals depending on the number of individuals each TVP improved. The integration of different evolution strategies in the MTV approach can improve the balance between exploration and exploitation, prevent premature convergence, and avoid local and deceptive optimum conditions. As part of the validation of the proposed MMKE algorithm, experiments on 29 test functions taken from the CEC 2018's special session on real-parameter optimization [27] were conducted. An evaluation of the results was made in comparison with state-of-the-art evolutionary and swarm intelligence algorithms, and then the statistical analysis was done. Additionally, the applicability of MMKE was demonstrated by solving engineering problems. Based on the comparisons and statistical analyses, the MMKE algorithm has proven to be superior to comparative algorithms.
The general methodology used in this research includes problem modeling and mathematical formulation, algorithmic design and development, performance assessment and comparison, and deployment for real-world applications. Regarding problem modeling and mathematical formulation, optimization is to find the best solution(s) from a collection of solutions that minimize (or maximize) an objective function and adhere to a number of constraints. The task of optimization can be mathematically formulated as a search to find X � , which minimizes such an objective function f(X � ) < f(X) for all X 2 O, where O is a nonempty large finite set as the domain of the search. Next, in the algorithmic design and development, the proposed MMKE algorithm's methodology is initializing, winner-based distributing, control stopping criteria, multi-trial vector producing, evaluating and population updating, and archiving.
The performance assessment in this research is done the same as works on metaheuristics which is qualitative and quantitative. In the qualitative assessment, a visual analysis of MMKE is provided along with two directions: trial vector impact analysis and exploration and exploitation behavior analysis. Then, MMKE's performance was evaluated using a quantitative analysis including exploration and exploitation, local optima avoidance, and convergence evaluation compared to eight state-of-the-art metaheuristic algorithms. Eventually, deployment for real-world applications includes five engineering problems that were used to study further the MMKE algorithm's potential to address real-world engineering difficulties.
The contributions of this study can be summarized as follows: • Amending the MKE algorithm's evolution scheme with the multi-trial vector (MTV) approach to enhance the original MKE's performance.
• Dividing the MKE's population into the number of sub-populations based on the winnerbased distribution policy and using an exclusive TVP for each sub-population to guide the individuals.
• Proposing northward evolution strategies by introducing two new trial vector producers.
• Using a combination of best-history trial vector producer (BTVP) and random trial vector producer (RTVP) in conjunction with canonical MKE (MKE-TVP) to improve global search capability, reducing the risk of trapping in the local optima and preventing premature convergence of the original MKE.
Based on the mentioned deficiencies of the MKE algorithm and the merits of the MTV approach, the research hypothesis is stated as follows: the performance of the MKE algorithm in terms of accuracy of the gained results, avoidance of local optima trapping, equilibrant exploitation and exploration, and prevention of premature convergence can be increased and enhanced using the MTV approach and effective trial vector producers.
The remainder of this article is structured in such a way that Section 2 summarizes relevant works. Section 3 contains the MKE algorithm's mathematical model and flowchart. The proposed MMKE algorithm is detailed in Section 4. Section 5 discusses the MMKE's qualitative and quantitative analysis, whereas Section 6 discusses the MMKE's statistical analysis. MMKE's applicability for solving real engineering design problems is assessed in Section 7. Finally, Section 8 concludes research findings and recommends further studies.  [63][64][65], power take off and placements of wave energy converters [66,67], power consumption [68,69], and wind speed prediction [70,71]. Although the majority of nature-inspired algorithms are proposed to solve continuous problems, there have been various methods to adapt these algorithms to solve problems with discrete nature [72]. Numerous real-world issues have been solved using the adapted methods, including feature selection [73][74][75][76][77][78][79], clustering and community detection [80][81][82][83][84], and medical diagnosis [85][86][87].

Related work
In nature-inspired algorithms, a population of individuals searches different regions of the solution space cooperatively by applying a search mechanism derived from natural phenomena. These algorithms possess two substantial aspects exploitation and exploration.
Exploration is related to an optimization algorithm's capability to explore diverse areas of the search space on a global scale. In contrast, exploitation refers to an algorithm's capability to identify solutions that are close to the optimal solution in promising regions. An excessive level of exploration can lead to a decrease in the probability of finding the optimal solution. At the same time, too much exploitation can cause the algorithm to be trapped in local optima [88]. Thus, a proper balance between exploration and exploitation is essential to enhance the search ability, avoid falling into local optima, and achieve a reasonable solution.
Although these aspects are considered in the design of metaheuristic algorithms, different behaviors can occur when they confront various optimization problems. Thus, different alterations are also performed in the canonical versions of nature-inspired algorithms to solve optimization problems with different characteristics and complexities. As a clarification, imbalanced exploration and exploitation of the GWO algorithm is improved in the Gaze cues learning-based grey wolf optimizer (GGWO) [89]. The same issue is resolved by defining a hybrid phase into the MFO algorithm in the variant improved moth-flame optimization (IMFO) algorithm [90]. Likewise, the search ability of the basic EPO algorithm is improved for color image segmentation in improved emperor penguin optimization (IEPO) [91] by using the levy flight, Gaussian mutation, and opposition-based learning. Higher performance and quick convergence are achieved by a new parameter-adaptive DE (PaDE) algorithm [92] while solving numerical optimization problems.
In stochastic search algorithms, the quality of obtained solutions depends on various aspects, such as the search strategy, the adjustment of the parameters, and constraint handling of the problem. As shown in Fig 1, metaheuristic algorithms based on the number of strategies used during the search process can be classified into single search strategy algorithms and multi-search strategies algorithms. Single search strategy algorithms may not be able to find an appropriate solution for problems with complex search space because an adaptation needs with the changes in the search landscape during the optimization process. Multiple strategies have different characteristics and capabilities in multi search strategies algorithms, such as exploration, exploitation, and maintaining diversity. Thus, an effective algorithm with a combination of the different strategies has the potential to deal with diverse kinds of optimization problems. Moreover, it is beneficial to use different search techniques to increase the probability of locating the optimal solution for a sophisticated optimization issue with a complex search space.
As shown in Fig 1, the algorithms containing multi-search strategies can be applied to the whole population or individual sub-populations. In the first category, all the strategies are applied to the whole population to discover the survivors for the following iteration. To be more specific, algorithms such as SaDE [93], CoDE [94], SL-PSO [95], I-GWO [96], and MSCA [97] are kinds of algorithms that apply multi-search strategies to the whole population of individuals. It is an effective way to deal with different problems but computationally expensive as needs to evaluate the fitness value of multiple produced candidates. Qin et al. have developed a self-adaptive DE (SaDE) that effectively uses two mutation strategies concurrently by adjusting the control parameters F and CR in accordance with prior knowledge. Wang et al. suggested a composite DE (CoDE) that includes three trial vector techniques and three control parameter settings. In order to create new vectors, each individual is assigned a new search strategy and parameter selection at random. Cheng and Jin proposed a social learning PSO (SL-PSO) in which all the particles except the best one use a social learning mechanism to learn from particles with better objective value in the current fitness-sorted population. In [97], a multi-strategy enhanced sine cosine algorithm named MSCA is proposed, in which four search mechanism is applied to the search agents, and in each iteration, the previous position replaces the best candidate solutions. In [96], I-GWO was proposed by introducing a new search strategy named dimension learning-based hunting (DLH). The I-GWO enhances diversity, strikes a balance between exploration and exploitation, and copes with premature convergence of GWO. The wolves' new position is selected between the GWO or the DLH search strategies according to the quality of obtained solutions.
In the second category, the main population is always split up into some small sub-populations, each of which is updated according to the assigned search strategy and control parameters to generate candidate solutions. This is a potential way to improve optimization performance by when each sub-population is responsible for exploring, exploiting, maintaining diversity, and reducing the probability of trap in local optima. In the literature, some algorithms were developed with multi sub-populations, each of which uses a different search

PLOS ONE
strategy. In [98], a multi-swarm cooperative particle swarm optimizer named MCPSO was proposed in which the population contains a master swarm and several slave swarms. The particles of the master swarm move according to both master swarm and slave swarms' knowledge, while the particles of slave swarms move based on the independent execution of PSO variants. In this algorithm, slave swarms can preserve diversity, and the interaction of this two kind of swarms has an effect on the balance between exploration and exploitation. In [99], multi-strategy ensemble particle swarm optimization (MEPSO) was proposed, in which parts I and II are a division of particles into two parts. Each part had a distinctive role in the search process; indeed, the Gaussian local search and differential mutation strategies were utilized in combination with the traditional PSO search algorithm for each part. The investigation revealed that the method utilized in part I can improve the algorithm's convergence, while the other part can improve the algorithm's exploration capability and avoidance of local optima.
EPSDE was suggested in [100], which comprises a collection of mutation and crossover and a pool of values matching to each related parameter that strive to develop better candidate solutions. EPSDE has proven to be competitive on a variety of optimization problems due to its proper moves in the search space. In [101], MPEDE, a multi-population based DE was proposed in which the population is partitioned into three sub-populations, each using a different mutation and update strategy. The constituent mutation strategies were selected from the literature are competitive in solving unimodal and multimodal optimization problems and performing a better exploration. The experimental results on the benchmark functions demonstrated that the proposed algorithm outperformed the other DE variants. An adaptive multi-population differential evolution (AMPDE) algorithm was proposed in [102], in which the size of the subpopulations was adaptively altered considering information gathered from prior search knowledge. Individuals from each sub-population were modified in accordance with the crossover operator that was assigned to them from GAs in order to create perturbed vectors. In [103], an adaptive DE with dynamic population reduction was proposed named sTDE-dR. The entire population was clustered into multiple tribes with different sizes, and each tribe has different mutation and crossover strategies. The experimental results showed the robustness of the proposed algorithms in comparison to the other comparative algorithms. As a variation on the developed MTV approach, [26], proposed a multi-trial vector-based differential evolution algorithm named MTDE. Despite previous algorithms that populations were divided into multiple sub-populations with smaller sizes, in the MTDE algorithm, the whole population is divided into three sub-populations with different sizes based on the defined distribution policy. The aim of using the combination of TVPs in the proposed algorithm is to maintain the population diversity, the balance between the exploration, and enhance the local search ability.

Monkey King Evolution (MKE) algorithm
The monkey king evolution algorithm (MKE) is a simple evolutionary algorithm inspired by the monkey king, a character of a Chinese mythological novel named "Journey to the West". In a tough situation, the monkey king can transform into a number of small monkeys, each of which tries to find and report a solution. Then, the monkey king selects the most suitable solution for the trouble. In the MKE algorithm, N monkey kings are randomly distributed in the search space with Dim dimensions. The monkey kings' position and the i th monkey king are denoted by matrix X and its i th row X i = {x i,1 , x i,2 , . . ., x i,Dim }. Then, in each generation, the monkey kings' fitness is calculated to determine the gbest particle with the best fitness value and then the matrix X gbest is built in which all rows are replicated by gbest position.
The MKE uses an evolution scheme to update the monkey kings' position in which first, two different matrixes X r1 and X r2 are constructed by permuting the row vectors of the matrix X. Next, the matrix of mutated monkeys denoted by B is built using Eq (1) where FC is the fluctuation coefficient parameter with a constant value 0.7.
Then, the evolved monkeys are calculated by Eq (2), where M is a transformation matrix, and � M is the binary inverse of M. The matrix M is generated from a lower triangular matrix with the elements set by one. After that, each row of the matrix's elements is randomly permutated, and then the sequence of row vectors of the matrix is separately permuted.
Finally, as shown in Fig 2, in the 7 th line of the pseudo-code of MKE, each evolved monkey's fitness value is calculated by which either the particle at the current position or its trial vector is selected to survive to the next generation.
Although the benchmarked results show that the MKE algorithm's performance is sufficient in comparison to some PSO-based variants, it has shortcomings, including premature convergence and inadequate exploration/exploitation balance. These defects originate from updating all monkey kings' positions using the MKE's evolution scheme based on the gbest.

Multi-trial vector-based monkey king evolution (MMKE) algorithm
Solving different optimization problems with various characteristics such as uni/multi-modality, (non)separability, (a)symmetry [27, 104] requires suitable search strategies. Furthermore, maintaining an equilibrium between exploration and exploitation prevents premature convergence and stagnation and provides a higher level of population diversity. Then, the effectiveness of a metaheuristic algorithm in solving optimization problems depends on selecting an appropriate search strategy and setting its parameters. On the other hand, based on the nofree-lunch (NFL) theorem, there is no general-purpose search strategy to cope with optimization problems and different strategies are required for solving diverse problems [2]. These considerations led us to propose an improved variant of the MKE algorithm named multi-trial vector-based monkey king evolution (MMKE) algorithm to tackle its insufficiencies. MKE's shortcomings include a premature convergence to local optima, an improper balance between PLOS ONE exploration and exploitation, and a fixed control parameter. These issues suppress the MKE algorithm's ability to handle different complicated problems.
As shown in Fig 3, the proposed MMKE algorithm's framework consists of four main phases: initializing, winner-based distributing, multi-trial vector producing of MMKE, evaluating and population updating, and archiving. Each of these phases are explained in the following paragraphs. Table 1 provides a nomenclature to show the parameters' description used in the following sections.
The simple evolution scheme of the MKE algorithm is substituted by the MTV approach to boost its performance using different evolution strategies for solving various optimization problems. Adapting the MTV approach enables the MKE algorithm to use a varying number of trial vector producers (TVPs) as required to achieve a particular behavioral outcome. Moreover, another advantage of using the MTV approach is to dedicate a portion of the whole population based on the winner-based distribution policy to each TVP. Furthermore, the population exchange between TVPs can enhance information sharing between monkeys and maintain diversity. The proposed MMKE algorithm uses three different evolution strategies integrated with a random fluctuation coefficient for enhancing the global search ability, reducing the probability of trapping in local optima, and preventing the original MKE's premature convergence.
The proposed MMKE algorithm's flowchart is depicted in Fig 4, consisting of initializing, winner-based distributing, multi-trial vector producing, evaluating and population updating, and archiving. In the initializing step, after the random distribution of N monkeys and evaluating the fitness of the initial population in every ngen generation and in the winner-based distributing step, the sub-population size of TVPs is determined by considering the reward rule distribution policy. Then, three trial vector producers, canonical MKE (MKE-TVP), best-history trial vector producer (BTVP), and random trial vector producer (RTVP), cooperate in the step of multi-trial vector producing to guide the monkeys over the search space. MMKE's ability to detect promising regions when solving different problems is significantly facilitated when these TVPs are combined. Then, in evaluating and population updating step, the monkeys' current position is updated after calculating the fitness of evolved monkeys. According to the archiving step, the inferior ones are archived to use their knowledge in TVPs. The stepwise procedure of the proposed MMKE algorithm is explained as follows.
Initializing step: N monkeys are randomly overspread within the predefined range [l, u] using Eq (3).
Where x ij is the position of the i th monkey king in the j th dimension, l j and u j are j th dimension's lowest and maximum bounds, and rand represents a random value between 0 and 1, respectively. The positions of N monkeys are stored in matrix X, which is a N×Dim matrix. The fitness value of monkey X i in t th generation is calculated by f (X i (t)).
The winner-based distributing step: The whole generation is divided into k portions including ngen generations. The first step of each portion is to select the best TVP or the producer with the highest rate of improvement over the previous ngen generations. Therefore, the improved rate of each TVP, IR Z-TVP (Z represents one of the TVPs), is calculated by dividing the number of improved monkeys by the number of function evaluations in the previous portion using Eq (4).

PLOS ONE
After determining the improved rate of each TVP, the size of each TVP's sub-population is calculated for the next n generations using the reward rule distribution policy defined in Eq (5), where there is N number of monkeys, N Z-TVP is the size of the sub-population considering the TVPs' improved rate, and λ = 0.25. Multi-trial vector producing step: In each generation, monkey X i is moved by one of the three different TVPs, MKE-TVP, BTVP, or RTVP. The MKE-TVP facilitates exploitation capability by enabling individuals to search for new solutions in their locality or immediate vicinity. Exploitation and escape from the local optima are handled using BTVP, whereas RTVP is designed to balance exploration and exploitation. Once each TVP mutates its dedicated sub-population, the evolved vector of the monkeys is produced using the M and � M matrixes by Eq (6). Monkey king evolution trial vector producer (MKE-TVP): As mentioned in the preceding section, in each generation, the best monkey from X is considered as gbest and preserved in gbest pop . Next, to move the monkey X i from X Mpop sub-population, the constant fluctuation coefficient (FC = 0.7) multiples to the differentiate of the two randomly selected monkeys X r1 Mpop and X r2 Mpop . Finally, the MKE-TVP generates the mutated vector V i Mpop by Eq (7).
Where V i Mpop is the mutated vector for i th monkey of X Mpop , gbest pop indicates the best

PLOS ONE
monkey from X, and X r1 Mpop and X r2 Mpop are two randomly selected monkeys from X Mpop sub-population. As shown in Fig 5, this strategy is more explorative at the earlier stages of the evolution and afterward becomes more exploitative at the later stages of the optimization and will produce well-distributed solutions around the best monkey. Since the strategy used is the same as the MKE evolution scheme, this leads to produce identical monkeys throughout the generations, resulting in the occurrence of undesirable convergence.
Best-history trial vector producer (BTVP): Despite the widespread use of the best monkey in MKE-TVP to help for fast convergence, it might suffer from the premature convergence problem. Therefore, in BTVP, we aim to use the top best monkeys to direct the population's evolution rather than the one global best. For this purpose, the best-history archive is designed to keep M recent best monkeys. At first, the best-history archive is initialized with the gbest vector and then the best vector is distinctively added to the gbest-history in the subsequent generations. If the best-history archive has no entry, the current best is replaced by the entry with the worst fitness value. In each generation, a matrix X BHpop which has N BTVP rows and Dim columns is created by repeating the best-history for (N BTVP /M) times. Then, the mutated vector V i Bpop is produced by Eq (8), where V i Bpop is the mutated vector for i th monkey of X Bpop , X i BHpop is the i th row of the best-history population and X r1 Bpop and X r2 Bpop are two randomly selected individuals from X Bpop .
Parameter C is a decreasing coefficient [105] which is computed by Eq (9), where α and β are the initial and final values of parameter C, MaxGen and gen indicate the maximum number of generations and the current generation, and μ is a dimension dependent value. This strategy is less greedy than the MKE-TVP and prevents local optima trapping. The pseudo-code of the BTVP shown in Fig 6. Random trial vector producer (RTVP): RTVP is proposed to prevent premature convergence and keep exploration and exploitation in balance. In fact, these problems are caused by the inability of the evolution strategies to generate newly evolved vectors and the failure to produce new promising monkeys. Therefore, the last TVP uses the difference between the current monkey and a random one from the population and a difference between two random monkeys from its sub-population (X Rpop ) and the combination of the archive and whole population (X Allpop ). Then, the mutated vector V i Rpop is produced by Eq (10).
Where V i Rpop is the mutated vector for i th monkey of X Rpop , X r1 Rpop and X r2 Rpop are two randomly selected individuals from X Rpop , X i Rpop is the i th monkey of X Rpop , and X j Allpop is the randomly selected solution from the union of X and archive, respectively. As explained in the following, F i is a scale factor which generated by Cauchy distribution. Despite using the constant FC, for each monkey, a random number generated by Cauchy distribution [106] is calculated as F i = randc i (μf, σ), where μ f is the mean value of improved scale factors initiated by 0.5 and σ = 0.2. In order to determine the value of F i , it must lie within the range (0, 1]; if F i is greater than 1, it is considered to be 1; otherwise, it should be recalculated. The scale factor F remains unchanged if there is absolutely no monkey with improved fitness in the population; however, if a monkey with enhanced fitness exists, μ f is calculated using the weighted Lehmer mean by Eq (11).
This TVP has a top priority for exploring and leading the search to the global optimum. Differences between random solutions are utilized to balance exploration and exploitation and preserve diversity throughout the optimization. The RTVP's pseudo-code shown in Fig 7. Evaluating and population updating: After the evolution of one generation of monkeys, the evolved monkeys' fitness value is assessed and compared with that of the previous generation and the best monkeys are survived and are allowed to participate in the next generation.

PLOS ONE
Archiving: During each generation, inferior monkeys, the solutions that their candidates were replaced, possess important information about the search space's potential areas. Thus, it is useful to save and distribute their knowledge in order to advise future generations of monkeys. To prohibit the residency of the earlier inferior monkeys' in the archive, each of them has a lifetime variable that demonstrates the duration of being in the archive. At the end of each generation, the inferior monkeys are added to the archive, and the lifetime is increased by one. The number of monkeys in the archive must not exceed N; in that case, inferior monkeys with a longer lifespan should be removed in random order. Using the archive throughout the development of monkeys makes it possible to retain a high level of diversity in simple and complex problems. The proposed MMKE algorithm's pseudo-code is demonstrated in Fig 7.

Experimental evaluation and results
Various experiments were designed to evaluate our proposed algorithm's performance by using different problems of the CEC 2018 [27]. First, a visual analysis of MMKE is provided along with two directions: trial vector impact analysis and exploration and exploitation behavior analysis. These experiments aimed to demonstrate the impact, convergence behavior, and explorative and exploitative tendencies of proposed trial vectors during the search process. Second, MMKE's performance was evaluated using a quantitative analysis including exploration and exploitation, local optima avoidance, and convergence evaluation in comparison to eight state-of-the-art metaheuristic algorithms.

Benchmark test functions and experimental environment
As part of this study, 29 benchmark functions from the CEC 2018 test suite [27] are used in order to evaluate the proposed MMKE algorithm. There are four kinds of functions in this test suite: unimodal, simple multimodal, hybrid, and composition functions. It is imperative to analyze the algorithm's exploitative capacity as well as its convergence behavior in issues where there is only one optimal solution. Unimodal functions (Func 1, Func 3) particularly serve this purpose. In addition, it is possible to test the algorithm's exploratory and local optima avoidance abilities using multimodal functions (Func 4-Func 10) having more than one local optimum. Considering the importance of striking a balance between exploration and exploitation when solving real-world issues, hybrid (Func 11-Func 20) and composition (Func 21-Func 30) functions are suitable for benchmarking this capability. The MMKE was developed by Matlab programming environment R2018a, and all experiments were run using an Intel i7 CPU with 3.4GHz and 8.00 GB memory.

Visual analysis
In this experiment set, the MMKE's visual analysis was performed on a number of selected functions of the CEC 2018 to analyse the impact of proposed trial vectors and exploration and exploitation behavior. First, to analyse the impact of introduced TVPs in the MMKE algorithm, the convergence of each TVP and the improved rate of each TVP is performed. Then, the exploration and exploitation tendency of MMKE is shown. All analyses were performed over (Dim×10000)/N generations, where N is the population size that set to 100 and Dim is the dimensions of the problem, which varies of 10, 30, and 50.

Trial vector impact analysis.
In the following subsection, the impact of the BTVP and RTVP evolution strategies examine on the performance of MMKE using two separate tests. The curves of these tests are shown in Figs 9 and 10 on six functions Func 3, Func 8, Func 10, Func 16, Func 21, and Func 30. In the first test, each MKE-TVP, BTV, and RTVP was considered as a distinct algorithm, and the best obtained result in each generation was compared to MMKE. As the curves shown in Fig 9, in comparison to MKE-TVP, better solutions are obtained by BTVP in unimodal, simple multimodal, hybrid, and composition functions. Thus, the findings of this analysis reveal that by using gbest-history, the BTVP is able to avoid premature convergence and entrapment in local optima, as well as perform superior exploitation. The RTVP is also able to better find optimal solutions for the hybrid and composition functions that can adjust a balance between exploration and exploitation and avoid premature convergence. This TVP has a top priority for exploring and leading the search to the global optimum. Differences between random solutions are utilized to balance exploration and exploitation and preserve diversity throughout the optimization.
In the second test, the improved rate of each TVP in the MMKE algorithm is calculated, and the percent of their improvement is indicated on the aforementioned functions of CEC 2018. As the curves shown in Fig 10, it is evident that BTVP and RTVP are dominant evolution strategies that have unique effects on the search process, while MKE-TVP has the least impact on the optimization process. Also, the improved rate of each TVP differs in functions with various features or even in different phases of the search process. By considering the curves shown in this figure, it reveals that the combination of MKE-TVP and BTVP has a superior effect on dealing with unimodal problems, while the cooperation of BTVP and RTVP in solving complex problems with many local optima is most significant.

Exploration and exploitation analysis.
In this section, the explorative and exploitative capabilities of the MMKE algorithm are examined on selected functions of CEC 2018. The exploration ability of an algorithm is to globally investigate more regions of the search space, while exploitation refers to locally search potential solutions in the promising regions to increase the efficiency of the found solution. Since metaheuristic algorithms use a population of solutions, the effect of exploration is more apparent when the distance between the solutions increases. On the other hand, the effect of exploitation increases when the distance among the solutions decreases. Depending on the search strategy of an algorithm, a tradeoff between

PLOS ONE
exploration and exploitation is needed to achieve a reasonable solution. To analyze this behavior, a dimension-wise diversity measurement [107] shown in Eq (13) is used to measure the distance among the solutions.
Where Div is the diversity measurement of the whole population in each generation, Dim and N are dimensions and the size of the population, and median x j (t) refers to the median of dimension j in the whole population. The exploration and exploitation invested by an algorithm can be calculated using Eq (14) and Eq (15), where Div max is the maximum diversity value during the optimization process. As can be observed from the plotted curves shown in Fig 11, both XPL% and XPT% are mutually complement each other and MMKE can be achieved an adequate balance between exploration and exploitation during the search process. Also, the figures demonstrate that MMKE starts to explore the search space through multiple candidate solutions. Then, exploration behavior is transformed into exploitation depending on the problem to be solved by a smooth transition. The plotted curves for the unimodal test functions Func 1 are shown in Fig 11 for dimensions 10, 30, and 50, which indicate that individuals investigate search space with a high proportion of exploration during the first one-fourth of the evolutionary process. Then, individuals gradually modify their behavior to accelerate convergence to a global optimal with a large proportion of exploitation. The exploration capability of the proposed algorithm was evaluated using multimodal test functions Func 8 and Func 10, including several local optima. The plotted curves for these test functions indicate that individuals alternate between exploration and exploitation to decrease the probability of being trapped in local optima. In addition, the large proportion of exploration signifies that individuals tend to enhance the possibility of discovering new areas inside the search space, although exploiting the optimal solution is continued in the last iterations. The plotted curves depicted for Func 16, Func 21, and Func 30 show that individuals explore the search space with a large proportion of exploration during the initial iterations, and this ratio subsequently decreases until this behavior transitions into the exploitation capacity, which grows to accelerate convergence speed.

Quantitative evaluation
Analyzing the performance of the MMKE algorithm is the objective of this subsection, which includes an extensive experimental study and a statistical evaluation. On the basis of the gained results, a comparison is conducted with state-of-the-art algorithms, including grey wolf optimizer (GWO) [17], whale optimization algorithm (WOA) [4], salp swarm algorithm (SSA) [14], butterfly optimization algorithm (BOA) [108], and Aquila optimizer (AO) [109] from swarm intelligence algorithms and well-known composite DE (CoDE) [94], the ensemble of mutation strategies and parameters in DE (EPSDE) [100], quasi-affine transformation evolutionary (QUATRE) [110], and monkey king evolution (MKE) [25] from the same category of evolutionary algorithms.
The values of any parameters related to the comparative algorithms were set in accordance with the recommendations from the original article, as shown in Table 2. A total of 20 separate runs with varying dimensions of 10, 30, and 50 were used to assess all benchmark functions. Every time a run was performed, the maximum number of generations (MaxGen) was determined by (Dim×10000)/N, where Dim and N were set to the problem's dimensions and a constant of 100. Reporting the obtained results is done by using the fitness error value f(gbest pop )-f (X � ), where f(gbest pop ) signifies the minimum fitness value gained and f(X � ) denotes the actual global optimum solution of the test function. The mean and standard deviation of the error values were used to assess the algorithms' performance. The experimental results are shown in

PLOS ONE
Tables 3-6, in which the best-obtained error values are remarked in boldface. Furthermore, the bottom three consecutive rows of each table designated "l/t/w" represent the number of algorithm losses (l), ties (t), and wins (w).

Exploration and exploitation evaluation.
The exploitative ability of algorithms is evaluated using unimodal functions, while the exploratory capability of algorithms is evaluated using multimodal functions. The exploitative and explorative qualifications of MMKE were evaluated and compared with comparative algorithms using these two kinds of test functions, which are detailed in the following: As shown in Table 3, the MMKE algorithm has a significantly improved performance over MKE in gaining more accurate results for unimodal functions in dimensions 10, 30, and 50. This is mostly because the MKE-TVP and BTVP use the evolution strategy that is mostly exploitative since the best monkey or best-history archive of monkeys is selected to guide the search. In dimension 50, this is because of the usage of BTVP and RTVP, which assist in escaping from local optima while still preserving diversity. As a result, the MMKE algorithm exploits the optimum solution more efficiently than the MKE algorithm and other comparative algorithms.
As per the results stated in Table 4, MMKE is capable of producing competitive results for simple multimodal functions, particularly those with dimensions 10 and 30. This experiment is carried out on Func 4-Func 10, where the number of local optima rises exponentially while     increasing the function dimension. These results prove that the proposed MMKE algorithm is competitive in exploration. The RTVP's preservation of diversity and extensive exploration of the search space is the primary reason for the adequate exploration of MMKE.

Evaluation of local optima avoidance.
Hybrid and composition functions are usually composed of a variety of unimodal and multimodal functions, making them more complex and challenging in the optimization process. Consequently, these functions are appropriate for evaluating the MMKE's capability to maintain the balance of exploration and exploitation, resulting in the avoidance of local optima.
For hybrid functions, the results in Table 5 show that MMKE surpasses all other algorithms in all three dimensions and produces better results. Furthermore, Table 6 shows the results of MMKE compared to comparative algorithms used in solving composition functions. Results demonstrated that the MMKE algorithm achieves a good balance between exploration and exploitation, which increases the ability to avoid local optima in a given situation. In addition, since each TVP's improved rate is considered when determining the portion size of sub-populations, a suitable balance between exploration and exploitation can be achieved.

Convergence evaluation.
This experiment aims to assess and compare the convergence behavior and speed of MMKE with the comparative algorithms. Fig 12 shows the convergence curves for the unimodal function Func 1, multimodal functions Func 5 and Func 10, and composition functions Func 21 and Func 26 on dimensions 10, 30, and 50. Each of these curves represents the mean of the best values in every generation over twenty runs for each algorithm.
As indicated by the curves in Fig 12, the MMKE demonstrates three convergence behaviors during the optimization process for test functions with diverse properties. First, there is a decreasing convergence in the early generations, in which an approximate optimal solution is found and maintained. The second behavior seen during the first half of the generations is faster convergence, and the estimate of the global optimum becomes increasingly accurate as the number of generations increases. Finally, the last behavior involves steady improvement of the solution until the last generations are reached. Based on the curves, it can be stated that the suggested MMKE algorithm is better capable of striking a balance between exploration and exploitation throughout generations than the comparative algorithms. The curves in Fig 12 Tables 3-6 and Fig 12. The MMKE algorithm is also superior to other comparative algorithms in which it achieves a faster convergence on multimodal and composition functions than comparative algorithms. Since the proposed algorithm uses a combination of best-obtained solutions in the BTVP and differences between random solutions, it achieves sufficient convergence, exploitation, and proper balance between exploration and exploitation. Additionally, the proposed algorithm maintains diversity throughout the optimization process by utilizing the differences between random solutions. The convergence curves presented in Fig 12 demonstrate that MMKE outperforms both the hybrid and composition functions, respectively. The MMKE's gained results prove that the exploration and exploitation processes are appropriately balanced in both hybrid and composition functions. Furthermore, the proposed MMKE algorithm maintains the diversity essential for dealing with issues in complicated functions.

Discussion and limitations
This subsection discusses the primary advancements and reasons that make the proposed MMKE algorithm suited for tackling complex benchmark functions and global optimization problems with superiority over comparative algorithms. The qualitative results which are represented in Figs 9 and 10, by utilizing gbest-history, the BTVP can prevent premature convergence and entrapment in local optima and perform greater exploitation, as shown by the results of this investigation. Additionally, the RTVP is able to locate optimal solutions for hybrid and composition functions that can strike a balance between exploration and exploitation and prevent premature convergence. This TVP is vital for exploring and directing the optimal global search. The exploration and exploitation analysis that is presented in Fig 11 demonstrates that MMKE allocates a high proportion of its resources to the exploitation of unimodal test functions and a high percentage of its resources to the investigation of multimodal test functions. Using the winner-based distributing and reward rule distribution policy, the proposed MMKE algorithm successfully switch between exploration and exploitation in hybrid and composition test functions.  According to the results and curves shown in Table 3 and Fig 12, the MMKE algorithm is very competitive for unimodal and multimodal test functions by accurately converging to the promising area in terms of its ability to exploit and explore. It is attributable to the BTVP and RTVP, which promote the flow of information through the use of informative monkeys from the best-history archive as well as random monkeys. The experimental evaluations presented in Tables 4 and 5

PLOS ONE
assigning the appropriate TVP. The experimental results demonstrate that the proposed MMKE algorithm competes with state-of-the-art evolutionary and swarm intelligence algorithms and has superior performance for solving unimodal, multimodal, hybrid, and composition test functions.
As with any research, ours has its limitations. Three TVPs were utilized in this investigation to inform the design of the winner-based distribution strategy, which will need to be revised for further trial vectors. The suggested MTDE's performance may also suffer when the problem's dimensions are exceedingly high. This restriction can be overcome by conducting preliminary experiments to establish the optimal archive size and policy for high-dimensional issues.

Statistical analysis
While the experimental assessment results compare the proposed MMKE algorithm's overall performance to that of comparative algorithms, the statistical significance of the algorithms is not revealed. Thus, the Friedman test [111] is used to prove MMKE's statistical superiority. The non-parametric test Friedman test (F f ) is used to rank all algorithms according to their performance. This test is utilized to determine the MMKE and comparative algorithms ranking according to their obtained fitness by Eq (16), where k, n, and R j are the number of algorithms, case tests, and the mean rank of the j th algorithm, respectively. It scores each algorithm/problem pair from 1 (best outcome) to k (worst result) and then averages the rankings achieved across all problems to get the algorithm's final rating.
In the Friedman test, the null hypothesis H0 which indicates there is no significant difference between the compared algorithms with p-value > 5%. The alternative hypothesis H1 assumed there is a significant difference between the results of the used algorithms for the 20 runs. This test scores each algorithm/problem pair from 1 (best outcome) to k (worst result) and then averages the rankings achieved across all problems to get the algorithm's final rating. Better algorithms are identified by small ranks. The results of the Friedman rank test at a 95% confidence level are given in Table 7. According to Table 7, the p-value reached through the non-parametric test indicated the significance of the results and demonstrated the MMKE algorithm's superiority on dimensions 10, 30, and 50 in comparison to state-of-the-art algorithms.

Applicability of MMKE for solving engineering design problems
As discussed in previous sections, metaheuristic algorithms are extremely useful for solving real-world engineering [112][113][114][115][116]. This section includes five engineering problems that were used to study further the MMKE algorithm's potential to address real-world engineering difficulties. MMKE and other comparative algorithms have been applied to the pressure vessel design [117], the welded beam design [118], the tension/compression spring [119], the threebar truss [120], and the optimal power flow problems for the IEEE 30-bus system [121]. A detailed description of these problems can be found in S1 Appendix. The death penalty function is used to manage constraints in these problems such that solutions that violate any of the constraints are ignored. As a result, a large number increases the fitness value of solutions that disrupt one or more constraints [1]. Each algorithm is run 30 times individually in this        Tables 8-13.
This experiment aims to investigate the stated hypothesis in real-life scenarios, whether using the MTV approach in the MKE algorithm enhances its performance in terms of local optima avoidance, premature convergence, and balanced equilibrant exploitation and

PLOS ONE
with two cases are considered. Based on the gained results, not only the proposed MMKE algorithm does perform better in constrained small-scale problems, but also achieves excellent results on medium-scale OPF problem for both single and multi-objective cases. In engineering design problems, MMKE could obtain similar and even better results because the cooperation of the defined TVPs prevents premature convergence and local optima trapping. In addition, sufficient exploration and exploitation of RTVP and preservation of diversity lead to superior results in medium-scale OPF problem. As a consequence of these results, the proposed MMKE algorithm is competitive and can discover objective values that are equivalent to or better than those solutions found by comparative algorithms.

Conclusion and future works
There are many stochastic algorithms, including evolution-based metaheuristic algorithms, that are well-known and powerful in solving optimization problems. There are, however, certain deficiencies to these algorithms when they are applied to complex problems. In this paper, we employed the multi-trial vector approach to present an effective multi-trial vector-based

PLOS ONE
monkey king evolution (MMKE) algorithm, which is an improvement over the evolutionary algorithm known as monkey king evolution (MKE). The evolution strategy used by the MKE resulted in premature convergence and an inadequate balance of exploration and exploitation. Thus, the MTV approach substituted the simple MKE evolution scheme, which employs a combination of various TVPs. By utilizing the MTV approach, the population is divided into several sub-populations using a winner-based distributing policy, where each subpopulation possesses its own TVP. In MMKE, two strategies, BTVP and RTVP, are corporate with the canonical MKE-TVP such that various problems can be tackled with distinct characteristics. Furthermore, as an additional advantage, MMKE uses the prior knowledge of the best individuals to avoid local optimums and premature convergence. In order to evaluate the performance of our proposed algorithm, a variety of experiments were carried out using the CEC 2018 test suite. First, MMKE was qualitatively evaluated in visual analysis subsection, followed by two directions of trial vector impact analysis and exploration and exploitation analysis. The main purpose of this subsection is to illustrate the significant effect and convergence behavior of suggested trial vectors throughout the search process, as well as their explorative and exploitative potential. Next, in Subsection 5.3, the performance of MMKE was quantitatively assessed in terms of exploration and exploitation, local optimality avoidance, and convergence assessment in comparison to eight state-of-the-art algorithms. The results revealed the effectiveness of MMKE in achieving optimum global solutions with more stable convergence than other well-known published optimization algorithms.
Then, experimental results were statistically analyzed using the Friedman test. In addition to demonstrating MMKE's statistical superiority over comparative algorithms, the statistical results also demonstrated that the MMKE algorithm guarantees the efficacy of explorations and maintains a balance between exploration and exploitation. Finally, we evaluated the applicability of the MMKE by solving four engineering design problems and the optimal power flow problem for the IEEE 30-bus system. MMKE has been able to provide superior solutions, both in terms of optimal objective function values and the number of function evaluations for these problems. MMKE shown significant performance advantages over other well-known optimization algorithms in engineering design problems and its ability to deal with various constraint problems.
For the purpose of providing a concise summary of the results gained via the performance assessment, Table 14 provides the overall effectiveness (OE) of the MMKE and comparative algorithms based on their total performance results presented in Tables 3-6. Therefore, it is imperative to calculate the algorithms' overall effectiveness (OE) by Eq (17), where N and L are the number of functions and the total number of loser functions for each algorithm, respectively.

PLOS ONE
The following remarks can be concluded from the overall effectiveness of MMKE and comparative algorithms. Firstly, for all different dimensions 10, 30, and 50, the proposed MMKE algorithm is superior to other comparative algorithms. In addition, another important remark is that MMKE is not only efficient than swarm intelligence algorithms including GWO, WOA, SSA, BOA, and AO but also it is a serious competitor for the evolutionary algorithms consisting of CoDE, EPSDE, QUATRE, and MKE.
The following conclusions can be taken from the results of experimental performance assessment, statistical analysis, and solutions gained for engineering design problems: • The proposed best-history trial vector producer (BTVP) and random trial vector producer (RTVP) enhance exploitation and exploration.
• In cooperation with the canonical MKE-TVP, the proposed BTVP and RTVP assist in improving the overall balance between exploration and exploitation. Thus, it becomes possible for the MMKE to escape the local optimality.
• The results derived from different qualitative and quantitative experiments conducted on diverse test functions with various characteristics along with statistical tests testify to the superior performance of the MMKE algorithm over the comparative algorithms.
• It has been shown that the MMKE algorithm effectively solves engineering problems.
The MMKE algorithm was proposed for the purpose of optimizing continuous singleobjective optimization problems. For future research, several directions can be considered. MMKE can be adapted to handle binary and multi-objective problems depending on the problem to be solved to tackle discrete, multi-objective, and many-objective real-world optimization problems. Moreover, attempting to tackle problems in various fields, such as scheduling, image processing, feature selection, clustering, and community detection, is beneficial. Eventually, proposing the aggregate version of MMKE such that the TVPs benefit from the search strategies of other algorithms could be a valuable and advantageous contribution.